﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DTO;

namespace GaSaiGon.GUI
{
    public partial class frmQuanLyVe : Form
    {
        public frmQuanLyVe()
        {
            InitializeComponent();
        }

        private void btnThemVe_Click(object sender, EventArgs e)
        {
            frmThemVe frm = new frmThemVe();
            frm.sender = new frmThemVe.SEND(getString);
            frm.Show();
        }
        public void getString(string s)
        {
            if (s == "Close")
            {
                ThongTinBUS TTBus = new ThongTinBUS();
                dgvDanhSach.DataSource = TTBus.Ve();
            }
        }
        private void frmQuanLyVe_Load(object sender, EventArgs e)
        {
            ThongTinBUS TTBus = new ThongTinBUS();
            dgvDanhSach.DataSource = TTBus.Ve();
        }

        private void btnDoiVeTraVe_Click(object sender, EventArgs e)
        {
            frmDoiTraVe frm = new frmDoiTraVe();
            frm.Show();
        }
    }
}
